//
//  LSRThemeVideoView.m
//  BaiSiProject
//
//  Created by lshenrong on 16/7/21.
//  Copyright © 2016年 lshenrong. All rights reserved.
//

#import "LSRThemeVideoView.h"
#import "LSRThemeItem.h"
#import <UIImageView+WebCache.h>
@class LSRThemeVideoView;
@interface LSRThemeVideoView()

@property (weak, nonatomic) IBOutlet UIImageView *pictureView;
@property (weak, nonatomic) IBOutlet UILabel *timeView;

@property (weak, nonatomic) IBOutlet UILabel *playCountView;

@end
@implementation LSRThemeVideoView

+(instancetype)themeVideoView
{
    
    return [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self)    owner:nil options:nil] lastObject];
}

-(void)setItem:(LSRThemeItem *)item
{
   
    _item=item;
    [self.pictureView sd_setImageWithURL:[NSURL URLWithString:item.image0]];
    
    self.playCountView.text=[NSString stringWithFormat:@"播放次数%ld",(long)item.videotime];
    
    NSInteger hour=item.voicetime/60;
    NSInteger minute=item.voicetime%60;
    
    NSString *timestring=[NSString stringWithFormat:@"%02ld:%02ld",(long)hour,minute];
    self.timeView.text=timestring;


}

@end
